<table>
  <tr>
    <th>Date</th>
    <th>Credit</th>
    <th>Debit</th>
    <th>Total</th>
    <th>Reference</th>
  </tr>

<% @transactions.each do |transaction| %>
  <tr>
    <td><%= transaction.on_date %></td>
    <td class="credit"><%= transaction.is_credit?? transaction.amount : "" %></td>
    <td class="debit"><%= transaction.is_credit?? "": transaction.amount %></td>
    <td class="total"></td>
    <td><%= transaction.reference_id%></td>
  </tr>
<% end %>
</table>
